<template>
	<view class="content">
		
		<view class="text-area">
			<text class="title">{{title}}</text>
		</view>
		<view>
			{{msg}}
		</view>
		<view>
			<input type="text"  v-model="msg" />
		</view>
		<view @click="changeCount" >
			count -== {{count}}
		</view>
		<view v-for="(l,i) in list" :key="i">
			{{l.name}}
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				title: 'Hello',
				msg:"wh2107-daydayup",
				count:1000,
				list:[]
			}
		},
		onLoad() {

		},
		mounted(){
			uni.showLoading({
				title:"请求中..."
			})
			wx.cloud.database().collection("wh07goods")
			.where({})
			.get()
			.then(res=>{
				uni.hideLoading()
				this.list = res.data 
			})
		},
		methods: {
			changeCount(){
				this.count+=10;
			}
		}
	}
</script>

<style>
	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}

	.logo {
		height: 200rpx;
		width: 200rpx;
		margin-top: 200rpx;
		margin-left: auto;
		margin-right: auto;
		margin-bottom: 50rpx;
	}

	.text-area {
		display: flex;
		justify-content: center;
	}

	.title {
		font-size: 36rpx;
		color: #8f8f94;
	}
</style>
